<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>示例6</title>
    <script src="jquery.js"></script>
    <script>
        function add(){
            $("#btn").on('click',function (){
                alert('点击了')
            })

            $("#btn").click(function (){
                alert("okok")
            })
        }

        function minus(){
            $("#btn").off('click')
        }
    </script>
</head>
<body>
    <button id="btn">点击</button>
    <hr/>
    <button onclick="add()">绑定事件</button>
    <button onclick="minus()">解除绑定</button>
</body>
</html>